package cz.cvut.kadledav.paa.knapsack.bo;

/**
 * User: David Kadlecek
 * Date: 2.10.13
 */
public class Item {

    private int id;
    private int weight;
    private int price;
    private double priceWeight;

    public Item(int id,int weight, int price) {
        this.id = id;
        this.weight = weight;
        this.price = price;
        this.priceWeight = (double)price/(double)weight;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getId() {
        return id;
    }

    public double getPriceWeight() {
        return priceWeight;
    }

    public void setPriceWeight(double priceWeight) {
        this.priceWeight = priceWeight;
    }

    @Override
    public String toString() {
        return "Item{" +
                "id=" + id +
                ", weights=" + weight +
                ", price=" + price +
                ", priceWeight=" + priceWeight +
                '}';
    }
}
